﻿using Mes.Pendant.ArrivalNotices;
using Mes.Pendant.NotificationArrivalServicess;
using Mes.Pendant.ProductionrequisitionService.Services;
using Mes.Pendant.Warehousesettings.Dto;
using Mes.Pendant.WarehousesettingW;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;

namespace Mes.Pendant.Web.Controllers
{
    public class ProductionrequisitionController : Controller
    {
        private readonly IProductionrequisitionServices _productionrequisitionServices;

        public ProductionrequisitionController(IProductionrequisitionServices productionrequisitionServices)
        {
            _productionrequisitionServices = productionrequisitionServices;
        }

        public IActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// 获取供应商数据
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<JsonResult> GetSupperdatas()
        {
            var supperList = await _productionrequisitionServices.Getsuppernames();
            return Json(new { code = 0, message = "success", data = supperList });
        }
    }
}
